﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NhapDoigiaban.ascx.cs" Inherits="WebUserControl_NhapDoigiaban" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="newWindow" namespace="newWindow" tagprefix="cc1" %>
<%@ Register Assembly="CSharp_MessageBox" Namespace="CSharp_MessageBox" TagPrefix="CS_Msg" %>
<%@ Import Namespace="BCDataCenter" %>
<%@ Register src="uscTitleForm.ascx" tagname="uscTitleForm" tagprefix="uc1" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/datePicker.css")%>' type="text/css" />


<style type="text/css">
     .AutoExtender
        {
            font-family: Verdana, Helvetica, sans-serif;
            font-size: .8em;
            font-weight: normal;
            border: solid 1px #006699;
            line-height: 20px;
            padding: 10px;
            background-color: White;
            margin-left:10px;
        }
        .AutoExtenderList
        {
            border-bottom: dotted 1px #006699;
            cursor: pointer;
            color: Maroon;
        }
        .AutoExtenderHighlight
        {
            color: White;
            background-color: #006699;
            cursor: pointer;
        }
        #divwidth
        {
          width: auto !important;    
        }
        #divwidth div
       {
        width: auto !important;   
       }
    .style1
    {
        width: 714px;
        height: 414px;
    }
    .style2
    {
        width: 1052px;
    }
    .style4
    {
        width: 705px;
        height: 24px;
    }
    .style6
    {
        width: 705px;
        height: 19px;
    }
    .style7
    {
        width: 705px;
    }
    .style8
    {
        width: 705px;
        height: 27px;
    }
    </style>
<script type="text/javascript">
     function pageLoad() {
     
     
     
      $("#<%= ImageButton1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        $("#<%= ImageButton2.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
      $("#<%= imb_tim.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
         $("#<%= imb_xoa.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script>  

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>


        <table style="width: 100%">  
            <tr>
                <td align="left" class="style2">
                    <uc1:uscTitleForm ID="uscTitleForm1" runat="server" Messeage="Nghiệp Vụ kho" />
                    
                </td>
            </tr>
             <tr>
                <td class="style2">
                    <asp:Panel ID="Panel1" runat="server" Width="100%" BackColor="#EBEBEB">
                        <asp:ImageButton ID="ImageButton1" runat="server" Height="25px" 
                            ImageUrl="~/image/Document.png" Width="25px" 
                            onclick="ImageButton1_Click" TabIndex="7" ToolTip="Thêm mới" />
                        <asp:ImageButton ID="ImageButton2" runat="server" Height="25px" 
                            ImageUrl="~/image/Save.png" Width="20px" onclick="ImageButton2_Click" 
                            TabIndex="8" ToolTip="Lưu" />
                        <asp:ImageButton ID="imb_tim" runat="server" Height="25px" 
                            ImageUrl="~/image/Find.png" onclick="imb_tim_Click" TabIndex="17" 
                            Width="18px" ToolTip="Tìm kiếm" />
                        <asp:ImageButton ID="imb_xoa" runat="server" Height="25px" Width="25px" 
                            ImageUrl="~/image/Symbol-Delete.png" onclick="imb_xoa_Click"  ToolTip="Xóa"/>
                            </asp:Panel>
                      
                </td>
            </tr>          
            <tr>
                <td class="style8">
                    <asp:Label ID="lbl_loainghiepvu" runat="server" Text="Loại NV" 
                TabIndex="1"  style="margin-bottom: 0px" Font-Size="12pt"></asp:Label>
                    <asp:DropDownList ID="Ddl_Loainghiepvu" runat="server"  
                style="margin-bottom: 0px" Width="150px" AutoPostBack="True" 
                onselectedindexchanged="Ddl_Loainghiepvu_SelectedIndexChanged" 
                TabIndex="2">
                    </asp:DropDownList>
                    <asp:Label ID="lbl_sohoadon" runat="server" Text="Số chứng từ" TabIndex="3" 
                 style="margin-bottom: 0px" Font-Size="12pt"></asp:Label>
                    <asp:DropDownList ID="Ddl_sochungtu" runat="server" 
                style="margin-bottom: 0px; margin-right: 0px;" Width="150px" 
                TabIndex="4" onselectedindexchanged="Ddl_sochungtu_SelectedIndexChanged" 
                AutoPostBack="True">
                    </asp:DropDownList>
                    <asp:Label ID="Label4" runat="server" Text="Ngày " TabIndex="5" ></asp:Label>
                    <asp:TextBox ID="txt_ngay" runat="server" Width="135px" 
                TabIndex="6" BorderStyle="Inset" style="margin-bottom: 0px"></asp:TextBox>
                    <cc1:CalendarExtender ID="txt_ngay_CalendarExtender" runat="server" Format ="dd/MM/yyyy"
                TargetControlID="txt_ngay">
                    </cc1:CalendarExtender>
                </td>
            </tr>
           
            <tr>
                <td class="style4">
                    <asp:Label ID="Label5" runat="server" Text="Mã hàng" Width="26%"></asp:Label>
                    <asp:Label ID="Label6" runat="server" Text="Tên hàng" Width="41%"></asp:Label>
                    <asp:Label ID="Label7" runat="server" Text="Giá cũ" Width="16%"></asp:Label>
                    <asp:Label ID="Label8" runat="server" Text="Giá mới" Width="15%"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style6">
                    <asp:TextBox ID="tb_mahang" runat="server" 
                ontextchanged="tb_mahang_TextChanged" TabIndex="11" AutoPostBack="True" 
                Width="25%" BorderStyle="Inset" CssClass = "TextBox"></asp:TextBox>
                    <cc1:AutoCompleteExtender ID="tb_mahang_AutoCompleteExtender" runat="server" 
                        DelimiterCharacters="" Enabled="True" 
                        ServiceMethod="GetMatHangInfo" ServicePath="~/Services/WebServiceNhapHoaDonBanHang.asmx" 
                        TargetControlID="tb_mahang"
                        MinimumPrefixLength="1"
                        CompletionInterval="10"
                        EnableCaching="True"
                        CompletionSetCount="12"                             
                        CompletionListCssClass="AutoExtender"
                        CompletionListItemCssClass="AutoExtenderList"
                        CompletionListHighlightedItemCssClass="AutoExtenderHighlight"
                        CompletionListElementID="divwidth"
                        UseContextKey="True">
                    </cc1:AutoCompleteExtender>
                    <asp:TextBox ID="tb_tenhang" runat="server" TabIndex="12"  
                Width="40%" BorderStyle="Inset"></asp:TextBox>
                    <asp:TextBox ID="tb_giacu" runat="server" TabIndex="13"
                Width="15%" BorderStyle="Inset"></asp:TextBox>
                    <asp:TextBox ID="tb_giamoi" runat="server" 
                ontextchanged="tb_giamoi_TextChanged" TabIndex="14" AutoPostBack="True" 
               Width="15%" BorderStyle="Inset"></asp:TextBox>
                </td>
            </tr>
            <tr>             
                <td valign ="top" scope="row" style="width:100%">
               <div style=" width:100%; height:400px; overflow:scroll">
                     <asp:GridView runat="server" AutoGenerateColumns="False" CellPadding="4" 
                    GridLines="Vertical" BackColor="White" BorderColor="#DEDFDE" BorderWidth="1px" 
                    BorderStyle="None" ForeColor="Black" Width="800px" ID="gv_chitiet" 
                    OnRowCancelingEdit="gv_chitiet_RowCancelingEdit" 
                    OnRowDeleting="gv_chitiet_RowDeleting" OnRowEditing="gv_chitiet_RowEditing" 
                    OnRowUpdating="gv_chitiet_RowUpdating" Height="16px">
                    <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>
                    <Columns>
                    <asp:BoundField DataField="itemkey" HeaderText="M&#227; h&#224;ng" ReadOnly="True"></asp:BoundField>
                    <asp:BoundField DataField="description" HeaderText="T&#234;n h&#224;ng" ReadOnly="True"></asp:BoundField>
                    <asp:BoundField DataField="oldprice" HeaderText="Gi&#225; Cũ" ReadOnly="True"></asp:BoundField>
                    <asp:BoundField DataField="Newprice" HeaderText="Gi&#225; mới"></asp:BoundField>
                    <asp:CommandField ShowDeleteButton="True" ShowEditButton="True">
                    <FooterStyle BackColor="White" BorderColor="White"></FooterStyle>

                    <HeaderStyle BackColor="White" BorderColor="White"></HeaderStyle>

                    <ItemStyle BackColor="White" BorderColor="White"></ItemStyle>
                    </asp:CommandField>
                    </Columns>

                    <FooterStyle BackColor="#CCCC99"></FooterStyle>

                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White"></HeaderStyle>

                    <PagerStyle HorizontalAlign="Center" BackColor="#F7F7DE" ForeColor="Black"></PagerStyle>

                    <RowStyle BackColor="#F7F7DE"></RowStyle>

                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White"></SelectedRowStyle>
                    </asp:GridView>

                </td>
            </tr>
        </table>        
        </ContentTemplate>
</asp:UpdatePanel>
 <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />
   

        

